// pages/ucenter/index/myContract.ts
Page({

  /**
   * 页面的初始数据
   */
  data: {
    tabs: [
      { name: '全部', count: 5 },
      { name: '履行中', count: 1 },
      { name: '已到期', count: 2 }
    ],
    lists: [
      {
        "id": "1",
        "number": "HTBH-00001",
        "state":"已完成",
        'txt':'这是一份政策周报',
        'time':'2024.01-2024.06'
      },
      {
        "id": "2",
        "number": "HTBH-00002",
        "state":"履行中",
        'txt':'这是一份政策周报',
        'time':'2024.01-2024.06'
      },
      {
        "id": "3",
        "number": "HTBH-00003",
        "state":"已到期",
        'txt':'这是一份政策周报',
        'time':'2024.01-2024.06'
      },
      {
        "id": "4",
        "number": "HTBH-00004",
        "state":"已到期",
        'txt':'这是一份政策周报',
        'time':'2024.01-2024.06'
      },
      {
        "id": "5",
        "number": "HTBH-00005",
        "state":"已完成",
        'txt':'这是一份政策周报',
        'time':'2024.01-2024.06'
      }
    ],
    lists1: [
    
      {
        "id": "2",
        "number": "HTBH-00002",
        "state":"履行中",
        'txt':'这是一份政策周报',
        'time':'2024.01-2024.06'
      },
    
    ],
    lists2: [
      {
        "id": "3",
        "number": "HTBH-00003",
        "state":"已到期",
        'txt':'这是一份政策周报',
        'time':'2024.01-2024.06'
      },
      {
        "id": "4",
        "number": "HTBH-00004",
        "state":"已到期",
        'txt':'这是一份政策周报',
        'time':'2024.01-2024.06'
      },

    ],
    lists3: [
      {
        "id": "1",
        "number": "HTBH-00001",
        "state":"已完成",
        'txt':'这是一份政策周报',
        'time':'2024.01-2024.06'
      },
      {
        "id": "2",
        "number": "HTBH-00002",
        "state":"履行中",
        'txt':'这是一份政策周报',
        'time':'2024.01-2024.06'
      },
      {
        "id": "3",
        "number": "HTBH-00003",
        "state":"已到期",
        'txt':'这是一份政策周报',
        'time':'2024.01-2024.06'
      },
      {
        "id": "4",
        "number": "HTBH-00004",
        "state":"已到期",
        'txt':'这是一份政策周报',
        'time':'2024.01-2024.06'
      },
      {
        "id": "5",
        "number": "HTBH-00005",
        "state":"已完成",
        'txt':'这是一份政策周报',
        'time':'2024.01-2024.06'
      }
    ],
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad() {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  },
  tabsItemChange(e){
    let tolists;
    if(e.detail.index==1){
        tolists = this.data.lists1;
    }else if(e.detail.index==2){
        tolists = this.data.lists2;
    }else{
        tolists = this.data.lists3;
    }
    this.setData({
        lists: tolists
    })
  }
})